using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_request_option"), DataContract]
    public class RequestOption
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmReqOptId", ResourceType = typeof(Resources.RequestOptionResource))]
        [Column("bgm_req_opt_seq", TypeName="int")]
        public int ReqOptId { get; set; }

        [ForeignKey("Request")]
		[DataMember, Display(Name = "BgmReqId", ResourceType = typeof(Resources.RequestOptionResource))]
		[Column("bgm_req_seq", TypeName="int")]
        public Nullable<int> ReqId { get; set; }

		[DataMember, Display(Name = "Descr", ResourceType = typeof(Resources.RequestOptionResource))]
		[Column("descr", TypeName="ntext")]
        public string Descr { get; set; }

		[DataMember, Display(Name = "Weight", ResourceType = typeof(Resources.RequestOptionResource))]
		[Column("weight", TypeName="decimal")]
        public Nullable<double> Weight { get; set; }

        [ForeignKey("MasOption")]
		[DataMember, Display(Name = "OptionId", ResourceType = typeof(Resources.RequestOptionResource))]
        [Column("bgm_option_seq", TypeName="int")]
        public Nullable<int> OptionId { get; set; }

        [DataMember]
        public virtual BGM.Request Request { get; set; }

        [DataMember]
        public virtual MasOption MasOption { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}